package com.joysuch.wwyt.bp.bean.inspect;

import com.alibaba.fastjson.JSON;
import com.joysuch.wwyt.bp.entity.inspect.BpInspectRecordDetail;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @Author ZhangDong
 * @Date 2020/3/12 17:22
 */
@Data
public class BpInspectPlanDeviceDetailDto {

    @ApiModelProperty("检查项目")
    private String inspectItem;

    @ApiModelProperty("检查标准")
    private String inspectStandard;

    @ApiModelProperty("检查结果 --app 已完成用到")
    private String inspectResult;

    @ApiModelProperty("检查结果状态 --app 已完成用到")
    private String inspectResultStatus;

    @ApiModelProperty("检查点设备照片json串 --app 已完成用到")
    private List<String> inspectDevicePictures;

    public BpInspectPlanDeviceDetailDto(BpInspectRecordDetail detail) {
        this.inspectItem = detail.getInspectItem();
        this.inspectStandard = detail.getInspectStandard();
        this.inspectResult = detail.getInspectResult();
        this.inspectResultStatus = detail.getInspectResultStatus();
        this.inspectDevicePictures = JSON.parseArray(detail.getInspectDevicePicture(), String.class);
    }

    public BpInspectPlanDeviceDetailDto() {
    }
}
